package com.service.impl;

import com.dao.UserDao;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

//    @Autowired
    UserDao userDao;

    public UserServiceImpl(@Autowired UserDao userDao){
        this.userDao = userDao;
        System.out.println("UserServiceImpl构造方法");
    }

    /*@Autowired
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
        System.out.println("setUserDao....");
    }*/

    @Override
    public void save() {
        userDao.save();
    }
}
